﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using T.Settlement.Domain;
using T.Settlement.Domain.DTO;
using T.Settlement.Repository.SettlementInterface;

namespace T.Settlement.Repository.SettlementImpl
{
    /// <summary>
    /// 付款仓储实现
    /// </summary>
    public class PaymentSRepository : SBaseRepository<Payment>, IPaymentSRepository
    {
        public PaymentSRepository(SEFDbcontext sEFdbcontext) : base(sEFdbcontext)
        {
        }
        /// <summary>
        /// 添加付款
        /// </summary>
        /// <param name="payment"></param>
        /// <returns></returns>
        public async Task<int> AddPayment(Payment payment)
        {
            return await base.AddAsync(payment);
        }
        /// <summary>
        /// 删除付款
        /// </summary>
        /// <param name="payment"></param>
        /// <returns></returns>
        public async Task<int> DelPayment(Payment payment)
        {
            return await base.Update(payment);
        }
        /// <summary>
        /// 修改付款
        /// </summary>
        /// <param name="payment"></param>
        /// <returns></returns>
        public async Task<int> UpdPayment(Payment payment)
        {
            return await base.Update(payment);
        }
        /// <summary>
        /// 显示付款
        /// </summary>
        /// <returns></returns>
        public async Task<List<Payment>> GetPayment()
        {
            return await base.GetAllAsync();
        }
    }
}
